package com.lx.information.service.impl;

import java.util.List;

import com.lx.information.domain.vo.InformationImportRecordVO;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lx.information.mapper.InformationImportRecordMapper;
import com.lx.information.domain.InformationImportRecord;
import com.lx.information.service.IInformationImportRecordService;

/**
 * 信息导入记录Service业务层处理
 *
 * @author lx
 * @date 2023-04-03
 */
@Service
public class InformationImportRecordServiceImpl implements IInformationImportRecordService
{
    @Autowired
    private InformationImportRecordMapper informationImportRecordMapper;

    /**
     * 查询信息导入记录
     *
     * @param id 信息导入记录主键
     * @return 信息导入记录
     */
    @Override
    public InformationImportRecord selectInformationImportRecordById(Long id)
    {
        return informationImportRecordMapper.selectInformationImportRecordById(id);
    }

    /**
     * 查询信息导入记录列表
     *
     * @param informationImportRecord 信息导入记录
     * @return 信息导入记录
     */
    @Override
    public List<InformationImportRecord> selectInformationImportRecordList(InformationImportRecord informationImportRecord)
    {
        return informationImportRecordMapper.selectInformationImportRecordList(informationImportRecord);
    }

    /**
     * 新增信息导入记录
     *
     * @param informationImportRecord 信息导入记录
     * @return 结果
     */
    @Override
    public int insertInformationImportRecord(InformationImportRecord informationImportRecord)
    {
        informationImportRecord.setCreateTime(DateUtils.getNowDate());
        return informationImportRecordMapper.insertInformationImportRecord(informationImportRecord);
    }

    /**
     * 修改信息导入记录
     *
     * @param informationImportRecord 信息导入记录
     * @return 结果
     */
    @Override
    public int updateInformationImportRecord(InformationImportRecord informationImportRecord)
    {
        informationImportRecord.setUpdateTime(DateUtils.getNowDate());
        return informationImportRecordMapper.updateInformationImportRecord(informationImportRecord);
    }

    /**
     * 批量删除信息导入记录
     *
     * @param ids 需要删除的信息导入记录主键
     * @return 结果
     */
    @Override
    public int deleteInformationImportRecordByIds(Long[] ids)
    {
        return informationImportRecordMapper.deleteInformationImportRecordByIds(ids);
    }

    /**
     * 删除信息导入记录信息
     *
     * @param id 信息导入记录主键
     * @return 结果
     */
    @Override
    public int deleteInformationImportRecordById(Long id)
    {
        return informationImportRecordMapper.deleteInformationImportRecordById(id);
    }

    @Override
    public List<InformationImportRecordVO> selectInformationImportRecordListByAuth(InformationImportRecord informationImportRecord, List<Long> userList) {
        return informationImportRecordMapper.selectInformationImportRecordListByAuth(informationImportRecord, userList);
    }
}
